package main

import (
	"encoding/json"
	"fmt"
)

func main() {
	p := &Person02{Name:"张三"}
	p.City = "北京"
	fmt.Printf("person=%#v\n", p)
	bytes, _ := json.Marshal(p)
	fmt.Println("json = ", string(bytes))
	p.print()
}

type Person02 struct {
	Name string
	Address02
}

type Address02 struct {
	City string
}

func (p *Person02) print() {
	fmt.Println("Name = ", p.Name)
}
